package com.luoxiang.socialandroid.dialog

import android.content.Context
import android.widget.Toast
import com.blankj.utilcode.util.ClipboardUtils
import com.luoxiang.socialandroid.R
import com.luoxiang.socialandroid.databinding.DialogLoginServiceTipBinding
import com.lxj.xpopup.impl.FullScreenPopupView

class LoginServiceTipDialog(context: Context) : FullScreenPopupView(context) {
    private lateinit var mViewBinding: DialogLoginServiceTipBinding

    override fun getImplLayoutId() = R.layout.dialog_login_service_tip

    override fun onCreate() {
        super.onCreate()
        mViewBinding = DialogLoginServiceTipBinding.bind(popupImplView)
        mViewBinding.textCopy.setOnClickListener {
            ClipboardUtils.copyText("13326404061")
            Toast.makeText(context, R.string.mi_copy_success, Toast.LENGTH_SHORT).show()
            dismiss()
        }
        mViewBinding.textOk.setOnClickListener {
            dismiss()
        }
    }
}